1. Field of the Invention
The present invention relates to a data converting method and apparatus applied to a videotex terminal for NAPLPS (North American Presentation Level Protocol Syntax), and especially to an apparatus for transforming PRESTEL codes to NAPLPS codes.
2. Prior Art of the Invention
Recently, videotex, which is a two way graphic communication system, has been developed rapidly as one of the most important new media. There are several videotex systems, one of which is PRESTEL, commercialized in the United Kingdom for the first time in the world. On the other hand, NAPLPS is standardized in the United States based on TELIDON which is the Canadian standard. The NAPLPS protocol is published by the American National Standards Institute and the Canadian Standards Association.
The PRESTEL code adopts a serial line attribute system in which color, shape, size, etc., of characters are controlled at every line but are limited to stored sets of instructions ("statically defined character sets") at the terminal.
The PRESTEL code (see FIG. 1) is roughly classified as three kinds: a character code (columns 2, 3, 6 or 7), an attribute code (escape code + columns 4 or 5) or a control code (0 or 1). For the character codes, there are alphanumeric characters such as A, B, C and so on and mosaic characters. They become characters that are displayed on the video screen. The attribute code is used to define the color, shape (alphanumeric character or mosaic figure) and the size of a display character and to define whether the color of the character to be displayed is a foreground color or a background color, etc. The control code is used to move the position at which the display character is to be displayed in the vertical and horizontal directions, to display a cursor on the video screen, to erase the cursor or to control the display of the whole of the video screen.
On the other hand, unlike such line attribute systems, the NAPLPS code is designed to display a wide variety of characters, figures and so on on any video screen and can even down load new character sets to the terminal.
NAPLPS Data Codes and Code Extension Procedures
NAPLPS data codes are formatted into 32-character control (C) sets and 96-character graphic (G) sets as shown in FIG. 2. These sets are manipulated, for the purpose of providing a virtual address space larger than the 128 or 256 characters available in a 7-bit or 8-bit code, via code extension techniques.
Code Extension for 7-Bit Environment
A code in which each data word (byte) consists of 7 information bits allows for the simultaneous representation of up to 128 characters. This 128 character absolute address space can be extended into a much larger virtual address space via the code extension procedures described below.
A 128 character in-use table is defined within the terminal's memory. Each incoming character is either decoded according to the current contents of this table or is used to change the contents of this table. The table itself (FIG. 2) is organized into eight columns of sixteen rows, with bits 1 through 4 defining the row number and bits 5 through 7 defining the column number. The in-use table always contains, in columns 0 and 1 (FIG. 6) the control code. Five characters of this control set, escape (ESC or 1/11, i.e., column 1, row 11), shift-in (SI or 0/15), shift-out (SO or 0/14), single-shift 2 (SS2 or 1/9), and single-shift 3 (SS3 or 1/13), are used to control the contents of the remaining six columns of the in-use table (FIGS. 3, 4, 5). The manner in which this is accomplished is graphically depicted in FIG. 2.
As shown in FIG. 2, four active graphic sets, the G0, G1, G2 and G3 sets are defined and can be dynamically selected from the larger graphics repertory by using three character escape sequences as shown. These sequences take the form ESC, I, F where I is the intermediate character and F is the final character. The intermediate character determines which set is to be changed (redesignated).
The final character determines which set from the graphics repertory is to be selected. The F character for the ASCII alphanumerics is assigned as 4/2. The three character escape sequence ESC, 2/8, 4/2, therefore, designates the ASCII alphanumerics as the current G0 set.
The shift-in (SI) character is used to invoke the current G0 set into the in-use table where it remains until further control action is taken (i.e., it is invoked in a locking manner). The shift-out (SO) character is used to invoke the current G1 set into the in-use table in a locking manner. The sequence locking shift 2 (LS2) is used to invoke the G3 set into the in-use table in a locking manner. The single-shift characters, SS2 and SS3, are used to invoke, in a non-locking manner, the G2 or G3 set, respectively, into the in-use table. (The range of the single-shift characters extends only to the next character received, that is, the in-use table automatically reverts to its former state after the character immediately following the single-shift is interpreted.) If any of the G sets are re-designated via a three character escape sequence while it is in the in-use table, the new code interpretations are simultaneously invoked, that is, a locking shift is not required for the change to take effect.
Upon initialization (e.g., power-up of the terminal), the ASCII alphanumerics are designated as the G0 set and the G0 set is invoked into the in-use table. The PDI codes are designated as the G1 set, Supplementary Graphics Characters are designated as the G2 set, and Mosaics are designated as the G3 set.
Graphic Sets
This section defines the graphic sets that can be used in conjunction with the code extension schemes described. Each graphic set consists of 96 character positions arranged in six columns by sixteen rows. Any one of these sets can be designated as any one of the four active G sets at any time. In a 7-bit environment these sets, when invoked, would occupy columns 2 through 7 of the in-use table. (See FIGS. 2, 3 and 4.)
8-Bit Environment
Similar coding schemes apply where an 8-bit code word is used. These are explained in the NAPLPS specification referred to above. It is to be understood that the present invention is not limited in its application to either the 7 or 8 bit code environment.
Further explanation is available in the NAPLPS specification of the American National Standards Institute and the Canadian Standards Association, described further herein. See also U.S. Pat. No. 4,439,761, which describes terminal generation of dynamically redefinable character sets.
Since the contents of the PRESTEL code and the NAPLPS code are different from each other as described above, the PRESTEL code cannot be directly decoded by a user terminal apparatus which can decode, for example, the NAPLPS code. However, if the NAPLPS user terminal apparatus can receive the PRESTEL code and can display a corresponding picture on a monitor receiver, this is very convenient for the user. This is also desirable for a work station of NAPLPS frame creation system (FCS). Such an apparatus, however, has not yet been developed.
In providing such an apparatus which would allow a PRESTEL code received by a NAPLPS user terminal apparatus to be decoded and converted to the NAPLPS code and then the corresponding picture displayed on the monitor thereof, a method of converting the PRESTEL code to the NAPLPS code is an important factor. Depending on the conversion method, there is a possibility that a NAPLPS encoder will become very complicated in construction and the hardware of the NAPLPS user terminal apparatus will have to be considerably modified.